//
//  KDCircleView.m
//  WangJingApp
//
//  Created by 魏强 on 17/1/13.
//  Copyright © 2017年 KDTech. All rights reserved.
//

#import "KDCircleView.h"

@implementation KDCircleView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    if(self = [super initWithFrame:frame]){
                [self drawCircle];
    }
    return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    self = [super initWithCoder:aDecoder];
    if (self) {
                [self drawCircle];
    }
    return self;
}
- (void)drawCircle{
    self.layer.cornerRadius = self.width *0.5;
    self.clipsToBounds = YES;
}
@end
